package com.example.demo.service.Impl;

import com.example.demo.ao.HomeDetailsAo;
import com.example.demo.mapper.HomeDetailsMapper;
import com.example.demo.service.HomeDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeDetailsServiceImpl implements HomeDetailsService {

    @Autowired
    private HomeDetailsMapper homeDetailsMapper;

    @Override
    public int updateInfo(List<HomeDetailsAo> homeDetailsAo) {
        int num = 0;
        for (HomeDetailsAo detailsAo : homeDetailsAo) {
            num = homeDetailsMapper.updateInfo(detailsAo);
        }
        return num;
    }

    @Override
    public int insertInfo(List<HomeDetailsAo> homeDetailsAo) {
        int num = 0;
        for (HomeDetailsAo detailsAo : homeDetailsAo) {
            num = homeDetailsMapper.insertInfo(detailsAo);
        }
        return num;
    }




}
